﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleAuth
{
    public class ConsoleFun
    {
        [ColsoleMethod]
        public static void OpenForm()
        {
            Console.WriteLine("OpenForm start");

            System.Windows.Forms.Application.EnableVisualStyles();
            System.Windows.Forms.Application.SetCompatibleTextRenderingDefault(false);

            var form = new FormAuth.Form1();

            form.FormClosing += (object sender, System.Windows.Forms.FormClosingEventArgs e) =>
            {
                Console.WriteLine("form FormClosed");
            };
            System.Windows.Forms.Application.Run(new FormAuth.Form1());
            
            Console.WriteLine("OpenForm end");
        }

        [ColsoleMethod]
        public void OpenForm2()
        {
            Console.WriteLine("this is OpenForm");
        }


        public static void OpenForm3()
        {
            Console.WriteLine("this is OpenForm");
        }
    }

    //标志特性
    public class ColsoleMethod:Attribute
    {

    }
}
